package main

import (
	real2 "cn.hughie/learngo/duck/real"
	"fmt"
	"time"
)

type Retriver interface {
	Get(string) string
}
type Poster interface {
	Post(string, map[string]string)
}
type RetriverPoster interface {
	Retriver
	Poster
}

func download(poster RetriverPoster) {
	now := time.Now()
	poster.Get("http://www.imooc.com")
	after := time.Now()
	fmt.Println(after.UnixNano()-now.UnixNano())
	poster.Post("www.imooc.com", map[string]string{
		"name": "yuh",
	})
}

func main() {
	rp := &real2.RetriverPoster{""}
	download(rp)
}
